package com.org.platform.utils.http;

/**
 * @author duheng
 * @Date 2021/6/17 16:58
 */
public class HttpTest {

	public static PooledHttpClientAdaptor adaptor = new PooledHttpClientAdaptor();

	public static void main(String[] args) {

//		Map<String, String> headerMap = new HashMap<>();
//		headerMap.put("sy-ov", "android");
//		headerMap.put("sy-an", "015400");
//		headerMap.put("ua-id", "38063");
//		headerMap.put("token",
//				"eyJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJhdXRoLWdhdGV3YXkiLCJhdWQiOiJqenQiLCJzdWIiOiJ5amt5Zjc4OSIsImV4cCI6MTYyNDUxMDU5MiwiaWF0IjoxNjI0NDk2MTkyLCJqdGkiOiI2MDUzNjI3NTE0ODQ3MjMyMDAiLCJhY2NvdW50Ijoie1wib25lSWRcIjpcInU1MTM0MDY1ODM5MTMzMTYzNTNcIixcInBsYXRmb3JtXCI6XCJiMmJcIixcInVzZXJBZ2VudElkXCI6XCIzODA2M1wiLFwibG9naW5OYW1lXCI6XCJ5amt5Zjc4OVwifSIsImN0IjoiUEMifQ.CIc1wulUA07vaGpobrzKmmo6TFYCgX81xcGgVLcOG54CbDThqGkDWhBvXWfcTp9tipeeXWMiFrH8cOdfjzI2DA");
//		Map<String, Object> paramMap = new HashMap<>();
//		paramMap.put("liveNo", "439367470503612416");
//		paramMap.put("liveRedId", "594");
//		final String url = "http://fdg.test2.yyjzt.com/mobile/live/getRedEnvelope";
//		String result = adaptor.doGet(url, headerMap, paramMap);

		final String url = "http://localhost:8081/shop/test/getTest";
		String result = adaptor.doGet(url);
		System.out.println(result);
//		int i = 0;
//		for (; ; ) {
//			if (i >= 500) {
//				return;
//			}
//			new Thread(new Runnable() {
//				@Override
//				public void run() {
//					String result = adaptor.doGet(url);
////					String result = adaptor.doGet(url, headerMap, paramMap);
//          System.out.println(result);
//				}
//			}).start();
//			i++;
//		}
//
//
	}

}
